package com.chushouya.manager.dto.admin.config;

import com.chushouya.common.constant.ConfigTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.general.framework.core.lang.Dates;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
public class ConfigListDTO  {

    @ApiModelProperty("参数主键")
    private Long configId;

    @ApiModelProperty("参数名称")
    private String configName;

    @ApiModelProperty("参数键名")
    private String configKey;

    @ApiModelProperty("参数键值")
    private String configValue;

    @ApiModelProperty("配置类型")
    private Integer configType;

    @ApiModelProperty("配置类型")
    private String configTypeDesc;

    @ApiModelProperty("系统配置")
    private Boolean systemConfig;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = Dates.FMT_FULL_TIME)
    private Date createTime;

    public String getConfigTypeDesc() {
        return ConfigTypeEnum.getDesc(this.configType);
    }
}
